<template>
  <div id="app">
    <h2>vue-i18n 框架测试</h2>
    <button>{{ $t("login") }}</button>
    <button>{{ $t("register") }}</button>
    <button @click.stop="changeLanguage">{{ $t("changeLanguage") }}</button>
    <hello-world></hello-world>
  </div>
</template>

<script>
import HelloWorld from "./components/HelloWorld.vue";
export default {
  name: "App",
  components: { HelloWorld },

  methods: {
    changeLanguage() {
      this.$i18n.locale = this.$i18n.locale === "zh" ? "en" : "zh";
    },
  },
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
